import Layout from '@/layout/index.vue'

export const defaultRoutes = [
    {
        path: '/login',
        name: 'Login',
        component:()=>import("@/views/login/index.vue"),
		meta: {
			title: '登录',
			isPublic: true,
		},
    },
    {
        path: '/dataview',
        name: 'dataview',
        component:()=>import("@/views/dataview/dataview.vue"),
		meta: {
			title: '大屏设计器',
		},
		redirect: '/dataview/projects',
		children:[
			{
				path: '/dataview/projects',
				name: 'projects',
				component:()=>import("@/views/dataview/pages/project/index.vue"),
				meta: {
					title: '项目列表',
				},
			},
			{
				path: '/dataview/template',
				name: 'template',
				component:()=>import("@/views/dataview/pages/template/index.vue"),
				meta: {
					title: '模板',
				},
			},
		]
    },
	{
		path: '/design/:id',
        name: 'desgin',
        component:()=>import("@/views/dataview/pages/design/index.vue"),
		meta: {
			title: '设计器',
			isPublic: true,
		},
	},
	{
		path:'/flowmanager/:formId?',
		name:'flowmanager',
		component:()=>import('@/views/flowCenter/index.vue'),
		meta: {
			title: '流程中心',
			isPublic: true,
		},
	}

]

export const notFoundAndNoPower = [
	{
		path: '/:path(.*)*',
		name: 'notFound',
		component: () => import('@/views/error/404.vue'),
		meta: {
			title: 'message.staticRoutes.notFound',
			isHide: true,
		},
	},
	{
		path: '/401',
		name: 'noPower',
		component: () => import('@/views/error/401.vue'),
		meta: {
			title: 'message.staticRoutes.noPower',
			isHide: true,
		},
	},
];


export const dynamicRoutes = [
    {
        path:'/',
        name:'Layout',
        redirect:'/dashboard/home',
        component:Layout,
        children:[
		],
		meta: {
			isKeepAlive: true,
		},
    },
    {
		path: '/platform/job/dashboard',
		name: 'jobDashboard',
		component: () => import('@/views/system/job/dashboard.vue'),
		meta: {
			title: '任务看板',
			isLink: import.meta.env.VITE_API_URL + '/schedule',
			isHide: true,
			isKeepAlive: true,
			isAffix: false,
			isIframe: true,
			icon: 'ele-Clock',
		},
	},
	{
		path: '/develop/database/visual',
		name: 'databaseVisual',
		component: () => import('@/views/system/database/component/visualTable.vue'),
		meta: {
			title: '库表可视化',
			isHide: true,
			isKeepAlive: true,
			isAffix: false,
			// isIframe: true,
			icon: 'ele-View',
		},
	},
]